import re

if __name__ == '__main__':
    r=open("C:\\Users\\diao\\Desktop\\source_id.txt","r",encoding="utf-8")
    w=open("C:\\Users\\diao\\Desktop\\ids_700-.txt","w",encoding="utf-8")

    pat=r'id: "(.*?)"'

    for line in r:
        line=line.replace("\n",'')
        id=re.findall(pat,line)
        print(id)
        if id:
            w.write(id[0]+"\n")

    r.close()
    w.close()